<?php

/**
 * @Author: kendy
 * @Date:   2020-03-24 15:15:15
 * @Last Modified by:   jiayanting
 * @Last Modified time: 2020-03-26 13:34:26
 */
namespace app\api\model;
use think\Controller;
use think\Model;
use think\Db; 
class OrderRefund extends Model
{
	public function addOrderRefund($obj){
      $refund['order_sn'] = $obj['order_sn'];
      $refund['object_id'] = $obj['object_id'];
      $refund['object_type'] = $obj['object_type'];
      $refund['u_id'] = $obj['user_id'];
      $refund['refund_status'] = $obj['refund_status'];
      $refund['refund_time'] = time();
      $refund['refund_reson'] = $obj['refund_reason'];
      $refund['back_money'] = $obj['order_price']; 
      $rs = Db::name('order_refund') 
      ->insert($refund);
      if(false !== $rs){
      	return true;
      }
      return false;
	}

}